3.3.93 \(\int \frac {a+b \sin (c+\frac {d}{x})}{(e+f x)^3} \, dx\) [293]

Optimal. Leaf size=233 \[ -\frac {a f}{2 e^2 \left (f+\frac {e}{x}\right )^2}+\frac {a}{e^2 \left (f+\frac {e}{x}\right )}-\frac {b d f \cos \left (c+\frac {d}{x}\right )}{2 e^3 \left (f+\frac {e}{x}\right )}-\frac {b d \cos \left (c-\frac {d f}{e}\right ) \text {Ci}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^3}-\frac {b d^2 f \text {Ci}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right ) \sin \left (c-\frac {d f}{e}\right )}{2 e^4}-\frac {b f \sin \left (c+\frac {d}{x}\right )}{2 e^2 \left (f+\frac {e}{x}\right )^2}+\frac {b \sin \left (c+\frac {d}{x}\right )}{e^2 \left (f+\frac {e}{x}\right )}-\frac {b d^2 f \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{2 e^4}+\frac {b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^3} \]

[Out]

-1/2*a*f/e^2/(f+e/x)^2+a/e^2/(f+e/x)-b*d*Ci(d*(f/e+1/x))*cos(c-d*f/e)/e^3-1/2*b*d*f*cos(c+d/x)/e^3/(f+e/x)-1/2
*b*d^2*f*cos(c-d*f/e)*Si(d*(f/e+1/x))/e^4-1/2*b*d^2*f*Ci(d*(f/e+1/x))*sin(c-d*f/e)/e^4+b*d*Si(d*(f/e+1/x))*sin
(c-d*f/e)/e^3-1/2*b*f*sin(c+d/x)/e^2/(f+e/x)^2+b*sin(c+d/x)/e^2/(f+e/x)

________________________________________________________________________________________

Rubi [A]
time = 0.30, antiderivative size = 233, normalized size of antiderivative = 1.00, number of steps used = 15, number of rules used = 6, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3512, 3398, 3378, 3384, 3380, 3383} \begin {gather*} \frac {a}{e^2 \left (\frac {e}{x}+f\right )}-\frac {a f}{2 e^2 \left (\frac {e}{x}+f\right )^2}-\frac {b d^2 f \sin \left (c-\frac {d f}{e}\right ) \text {CosIntegral}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{2 e^4}-\frac {b d \cos \left (c-\frac {d f}{e}\right ) \text {CosIntegral}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^3}-\frac {b d^2 f \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{2 e^4}+\frac {b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{e^3}-\frac {b d f \cos \left (c+\frac {d}{x}\right )}{2 e^3 \left (\frac {e}{x}+f\right )}+\frac {b \sin \left (c+\frac {d}{x}\right )}{e^2 \left (\frac {e}{x}+f\right )}-\frac {b f \sin \left (c+\frac {d}{x}\right )}{2 e^2 \left (\frac {e}{x}+f\right )^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Sin[c + d/x])/(e + f*x)^3,x]

[Out]

-1/2*(a*f)/(e^2*(f + e/x)^2) + a/(e^2*(f + e/x)) - (b*d*f*Cos[c + d/x])/(2*e^3*(f + e/x)) - (b*d*Cos[c - (d*f)
/e]*CosIntegral[d*(f/e + x^(-1))])/e^3 - (b*d^2*f*CosIntegral[d*(f/e + x^(-1))]*Sin[c - (d*f)/e])/(2*e^4) - (b
*f*Sin[c + d/x])/(2*e^2*(f + e/x)^2) + (b*Sin[c + d/x])/(e^2*(f + e/x)) - (b*d^2*f*Cos[c - (d*f)/e]*SinIntegra
l[d*(f/e + x^(-1))])/(2*e^4) + (b*d*Sin[c - (d*f)/e]*SinIntegral[d*(f/e + x^(-1))])/e^3

Rule 3378

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(c + d*x)^(m + 1)*(Sin[e + f*x]/(d*(m
 + 1))), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3380

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3383

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3384

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[c*(f/d) + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3398

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rule 3512

Int[((g_.) + (h_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)])^(p_.), x_Symbol] :
> Dist[1/(n*f), Subst[Int[ExpandIntegrand[(a + b*Sin[c + d*x])^p, x^(1/n - 1)*(g - e*(h/f) + h*(x^(1/n)/f))^m,
 x], x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p, 0] && IntegerQ[1/n]

Rubi steps

\begin {align*} \int \frac {a+b \sin \left (c+\frac {d}{x}\right )}{(e+f x)^3} \, dx &=-\text {Subst}\left (\int \left (-\frac {f (a+b \sin (c+d x))}{e (f+e x)^3}+\frac {a+b \sin (c+d x)}{e (f+e x)^2}\right ) \, dx,x,\frac {1}{x}\right )\\ &=-\frac {\text {Subst}\left (\int \frac {a+b \sin (c+d x)}{(f+e x)^2} \, dx,x,\frac {1}{x}\right )}{e}+\frac {f \text {Subst}\left (\int \frac {a+b \sin (c+d x)}{(f+e x)^3} \, dx,x,\frac {1}{x}\right )}{e}\\ &=-\frac {\text {Subst}\left (\int \left (\frac {a}{(f+e x)^2}+\frac {b \sin (c+d x)}{(f+e x)^2}\right ) \, dx,x,\frac {1}{x}\right )}{e}+\frac {f \text {Subst}\left (\int \left (\frac {a}{(f+e x)^3}+\frac {b \sin (c+d x)}{(f+e x)^3}\right ) \, dx,x,\frac {1}{x}\right )}{e}\\ &=-\frac {a f}{2 e^2 \left (f+\frac {e}{x}\right )^2}+\frac {a}{e^2 \left (f+\frac {e}{x}\right )}-\frac {b \text {Subst}\left (\int \frac {\sin (c+d x)}{(f+e x)^2} \, dx,x,\frac {1}{x}\right )}{e}+\frac {(b f) \text {Subst}\left (\int \frac {\sin (c+d x)}{(f+e x)^3} \, dx,x,\frac {1}{x}\right )}{e}\\ &=-\frac {a f}{2 e^2 \left (f+\frac {e}{x}\right )^2}+\frac {a}{e^2 \left (f+\frac {e}{x}\right )}-\frac {b f \sin \left (c+\frac {d}{x}\right )}{2 e^2 \left (f+\frac {e}{x}\right )^2}+\frac {b \sin \left (c+\frac {d}{x}\right )}{e^2 \left (f+\frac {e}{x}\right )}-\frac {(b d) \text {Subst}\left (\int \frac {\cos (c+d x)}{f+e x} \, dx,x,\frac {1}{x}\right )}{e^2}+\frac {(b d f) \text {Subst}\left (\int \frac {\cos (c+d x)}{(f+e x)^2} \, dx,x,\frac {1}{x}\right )}{2 e^2}\\ &=-\frac {a f}{2 e^2 \left (f+\frac {e}{x}\right )^2}+\frac {a}{e^2 \left (f+\frac {e}{x}\right )}-\frac {b d f \cos \left (c+\frac {d}{x}\right )}{2 e^3 \left (f+\frac {e}{x}\right )}-\frac {b f \sin \left (c+\frac {d}{x}\right )}{2 e^2 \left (f+\frac {e}{x}\right )^2}+\frac {b \sin \left (c+\frac {d}{x}\right )}{e^2 \left (f+\frac {e}{x}\right )}-\frac {\left (b d^2 f\right ) \text {Subst}\left (\int \frac {\sin (c+d x)}{f+e x} \, dx,x,\frac {1}{x}\right )}{2 e^3}-\frac {\left (b d \cos \left (c-\frac {d f}{e}\right )\right ) \text {Subst}\left (\int \frac {\cos \left (\frac {d f}{e}+d x\right )}{f+e x} \, dx,x,\frac {1}{x}\right )}{e^2}+\frac {\left (b d \sin \left (c-\frac {d f}{e}\right )\right ) \text {Subst}\left (\int \frac {\sin \left (\frac {d f}{e}+d x\right )}{f+e x} \, dx,x,\frac {1}{x}\right )}{e^2}\\ &=-\frac {a f}{2 e^2 \left (f+\frac {e}{x}\right )^2}+\frac {a}{e^2 \left (f+\frac {e}{x}\right )}-\frac {b d f \cos \left (c+\frac {d}{x}\right )}{2 e^3 \left (f+\frac {e}{x}\right )}-\frac {b d \cos \left (c-\frac {d f}{e}\right ) \text {Ci}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right )}{e^3}-\frac {b f \sin \left (c+\frac {d}{x}\right )}{2 e^2 \left (f+\frac {e}{x}\right )^2}+\frac {b \sin \left (c+\frac {d}{x}\right )}{e^2 \left (f+\frac {e}{x}\right )}+\frac {b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right )}{e^3}-\frac {\left (b d^2 f \cos \left (c-\frac {d f}{e}\right )\right ) \text {Subst}\left (\int \frac {\sin \left (\frac {d f}{e}+d x\right )}{f+e x} \, dx,x,\frac {1}{x}\right )}{2 e^3}-\frac {\left (b d^2 f \sin \left (c-\frac {d f}{e}\right )\right ) \text {Subst}\left (\int \frac {\cos \left (\frac {d f}{e}+d x\right )}{f+e x} \, dx,x,\frac {1}{x}\right )}{2 e^3}\\ &=-\frac {a f}{2 e^2 \left (f+\frac {e}{x}\right )^2}+\frac {a}{e^2 \left (f+\frac {e}{x}\right )}-\frac {b d f \cos \left (c+\frac {d}{x}\right )}{2 e^3 \left (f+\frac {e}{x}\right )}-\frac {b d \cos \left (c-\frac {d f}{e}\right ) \text {Ci}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right )}{e^3}-\frac {b d^2 f \text {Ci}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right ) \sin \left (c-\frac {d f}{e}\right )}{2 e^4}-\frac {b f \sin \left (c+\frac {d}{x}\right )}{2 e^2 \left (f+\frac {e}{x}\right )^2}+\frac {b \sin \left (c+\frac {d}{x}\right )}{e^2 \left (f+\frac {e}{x}\right )}-\frac {b d^2 f \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right )}{2 e^4}+\frac {b d \sin \left (c-\frac {d f}{e}\right ) \text {Si}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right )}{e^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.22, size = 151, normalized size = 0.65 \begin {gather*} -\frac {b d \text {Ci}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right ) \left (2 e \cos \left (c-\frac {d f}{e}\right )+d f \sin \left (c-\frac {d f}{e}\right )\right )+\frac {e \left (a e^3+b d f^2 x (e+f x) \cos \left (c+\frac {d}{x}\right )-b e f x (2 e+f x) \sin \left (c+\frac {d}{x}\right )\right )}{f (e+f x)^2}+b d \left (d f \cos \left (c-\frac {d f}{e}\right )-2 e \sin \left (c-\frac {d f}{e}\right )\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{2 e^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sin[c + d/x])/(e + f*x)^3,x]

[Out]

-1/2*(b*d*CosIntegral[d*(f/e + x^(-1))]*(2*e*Cos[c - (d*f)/e] + d*f*Sin[c - (d*f)/e]) + (e*(a*e^3 + b*d*f^2*x*
(e + f*x)*Cos[c + d/x] - b*e*f*x*(2*e + f*x)*Sin[c + d/x]))/(f*(e + f*x)^2) + b*d*(d*f*Cos[c - (d*f)/e] - 2*e*
Sin[c - (d*f)/e])*SinIntegral[d*(f/e + x^(-1))])/e^4

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(541\) vs. \(2(223)=446\).
time = 0.12, size = 542, normalized size = 2.33

method result size
risch \(-\frac {a}{2 f \left (f x +e \right )^{2}}+\frac {i b \,d^{2} {\mathrm e}^{-\frac {i \left (c e -d f \right )}{e}} \expIntegral \left (1, \frac {i d}{x}+i c -\frac {i \left (c e -d f \right )}{e}\right ) f}{4 e^{4}}+\frac {b d \,{\mathrm e}^{-\frac {i \left (c e -d f \right )}{e}} \expIntegral \left (1, \frac {i d}{x}+i c -\frac {i \left (c e -d f \right )}{e}\right )}{2 e^{3}}+\frac {b d \,{\mathrm e}^{\frac {i \left (c e -d f \right )}{e}} \expIntegral \left (1, -\frac {i d}{x}-i c -\frac {-i c e +i d f}{e}\right )}{2 e^{3}}-\frac {i b \,d^{2} f \,{\mathrm e}^{\frac {i \left (c e -d f \right )}{e}} \expIntegral \left (1, -\frac {i d}{x}-i c -\frac {-i c e +i d f}{e}\right )}{4 e^{4}}+\frac {i b x \left (2 i d^{3} f^{4} x^{3}+6 i d^{3} e \,f^{3} x^{2}+6 i d^{3} e^{2} f^{2} x +2 i d^{3} e^{3} f \right ) \cos \left (\frac {c x +d}{x}\right )}{4 e^{3} \left (f x +e \right )^{2} \left (d^{2} x^{2} f^{2}+2 d^{2} e f x +d^{2} e^{2}\right )}-\frac {b x \left (-2 d^{2} f^{3} x^{3}-8 d^{2} e \,f^{2} x^{2}-10 d^{2} e^{2} f x -4 d^{2} e^{3}\right ) \sin \left (\frac {c x +d}{x}\right )}{4 e^{2} \left (f x +e \right )^{2} \left (d^{2} x^{2} f^{2}+2 d^{2} e f x +d^{2} e^{2}\right )}\) \(423\)
derivativedivides \(-d \left (-\frac {a}{e^{2} \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )}-\frac {\left (c e -d f \right ) a}{2 e^{2} \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )^{2}}+\frac {\left (c e -d f \right ) b \left (-\frac {\sin \left (c +\frac {d}{x}\right )}{2 \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )^{2} e}+\frac {-\frac {\cos \left (c +\frac {d}{x}\right )}{\left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}-\frac {-\frac {\sinIntegral \left (-\frac {d}{x}-c -\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}-\frac {\cosineIntegral \left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}}{e}}{2 e}\right )}{e}+\frac {b \left (-\frac {\sin \left (c +\frac {d}{x}\right )}{\left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}+\frac {-\frac {\sinIntegral \left (-\frac {d}{x}-c -\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}+\frac {\cosineIntegral \left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}}{e}\right )}{e}+\frac {c a}{2 \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )^{2} e}-c b \left (-\frac {\sin \left (c +\frac {d}{x}\right )}{2 \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )^{2} e}+\frac {-\frac {\cos \left (c +\frac {d}{x}\right )}{\left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}-\frac {-\frac {\sinIntegral \left (-\frac {d}{x}-c -\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}-\frac {\cosineIntegral \left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}}{e}}{2 e}\right )\right )\) \(542\)
default \(-d \left (-\frac {a}{e^{2} \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )}-\frac {\left (c e -d f \right ) a}{2 e^{2} \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )^{2}}+\frac {\left (c e -d f \right ) b \left (-\frac {\sin \left (c +\frac {d}{x}\right )}{2 \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )^{2} e}+\frac {-\frac {\cos \left (c +\frac {d}{x}\right )}{\left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}-\frac {-\frac {\sinIntegral \left (-\frac {d}{x}-c -\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}-\frac {\cosineIntegral \left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}}{e}}{2 e}\right )}{e}+\frac {b \left (-\frac {\sin \left (c +\frac {d}{x}\right )}{\left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}+\frac {-\frac {\sinIntegral \left (-\frac {d}{x}-c -\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}+\frac {\cosineIntegral \left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}}{e}\right )}{e}+\frac {c a}{2 \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )^{2} e}-c b \left (-\frac {\sin \left (c +\frac {d}{x}\right )}{2 \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )^{2} e}+\frac {-\frac {\cos \left (c +\frac {d}{x}\right )}{\left (-c e +d f +e \left (c +\frac {d}{x}\right )\right ) e}-\frac {-\frac {\sinIntegral \left (-\frac {d}{x}-c -\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}-\frac {\cosineIntegral \left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}}{e}}{2 e}\right )\right )\) \(542\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sin(c+d/x))/(f*x+e)^3,x,method=_RETURNVERBOSE)

[Out]

-d*(-a/e^2/(-c*e+d*f+e*(c+d/x))-1/2*(c*e-d*f)/e^2*a/(-c*e+d*f+e*(c+d/x))^2+(c*e-d*f)/e*b*(-1/2*sin(c+d/x)/(-c*
e+d*f+e*(c+d/x))^2/e+1/2*(-cos(c+d/x)/(-c*e+d*f+e*(c+d/x))/e-(-Si(-d/x-c-(-c*e+d*f)/e)*cos((-c*e+d*f)/e)/e-Ci(
d/x+c+(-c*e+d*f)/e)*sin((-c*e+d*f)/e)/e)/e)/e)+b/e*(-sin(c+d/x)/(-c*e+d*f+e*(c+d/x))/e+(-Si(-d/x-c-(-c*e+d*f)/
e)*sin((-c*e+d*f)/e)/e+Ci(d/x+c+(-c*e+d*f)/e)*cos((-c*e+d*f)/e)/e)/e)+1/2*c*a/(-c*e+d*f+e*(c+d/x))^2/e-c*b*(-1
/2*sin(c+d/x)/(-c*e+d*f+e*(c+d/x))^2/e+1/2*(-cos(c+d/x)/(-c*e+d*f+e*(c+d/x))/e-(-Si(-d/x-c-(-c*e+d*f)/e)*cos((
-c*e+d*f)/e)/e-Ci(d/x+c+(-c*e+d*f)/e)*sin((-c*e+d*f)/e)/e)/e)/e))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))/(f*x+e)^3,x, algorithm="maxima")

[Out]

b*(integrate(1/2*sin((c*x + d)/x)/(f^3*x^3 + 3*f^2*x^2*e + 3*f*x*e^2 + e^3), x) + integrate(1/2*sin((c*x + d)/
x)/((f^3*x^3 + 3*f^2*x^2*e + 3*f*x*e^2 + e^3)*cos((c*x + d)/x)^2 + (f^3*x^3 + 3*f^2*x^2*e + 3*f*x*e^2 + e^3)*s
in((c*x + d)/x)^2), x)) - 1/2*a/(f^3*x^2 + 2*f^2*x*e + f*e^2)

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 419, normalized size = 1.80 \begin {gather*} -\frac {2 \, {\left ({\left (b d f^{3} x^{2} e + 2 \, b d f^{2} x e^{2} + b d f e^{3}\right )} \operatorname {Ci}\left (\frac {{\left (d f x + d e\right )} e^{\left (-1\right )}}{x}\right ) + {\left (b d f^{3} x^{2} e + 2 \, b d f^{2} x e^{2} + b d f e^{3}\right )} \operatorname {Ci}\left (-\frac {{\left (d f x + d e\right )} e^{\left (-1\right )}}{x}\right ) + {\left (b d^{2} f^{4} x^{2} + 2 \, b d^{2} f^{3} x e + b d^{2} f^{2} e^{2}\right )} \operatorname {Si}\left (\frac {{\left (d f x + d e\right )} e^{\left (-1\right )}}{x}\right )\right )} \cos \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) + 2 \, {\left (b d f^{3} x^{2} e + b d f^{2} x e^{2}\right )} \cos \left (\frac {c x + d}{x}\right ) + 2 \, a e^{4} + {\left ({\left (b d^{2} f^{4} x^{2} + 2 \, b d^{2} f^{3} x e + b d^{2} f^{2} e^{2}\right )} \operatorname {Ci}\left (\frac {{\left (d f x + d e\right )} e^{\left (-1\right )}}{x}\right ) + {\left (b d^{2} f^{4} x^{2} + 2 \, b d^{2} f^{3} x e + b d^{2} f^{2} e^{2}\right )} \operatorname {Ci}\left (-\frac {{\left (d f x + d e\right )} e^{\left (-1\right )}}{x}\right ) - 4 \, {\left (b d f^{3} x^{2} e + 2 \, b d f^{2} x e^{2} + b d f e^{3}\right )} \operatorname {Si}\left (\frac {{\left (d f x + d e\right )} e^{\left (-1\right )}}{x}\right )\right )} \sin \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) - 2 \, {\left (b f^{2} x^{2} e^{2} + 2 \, b f x e^{3}\right )} \sin \left (\frac {c x + d}{x}\right )}{4 \, {\left (f^{3} x^{2} e^{4} + 2 \, f^{2} x e^{5} + f e^{6}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))/(f*x+e)^3,x, algorithm="fricas")

[Out]

-1/4*(2*((b*d*f^3*x^2*e + 2*b*d*f^2*x*e^2 + b*d*f*e^3)*cos_integral((d*f*x + d*e)*e^(-1)/x) + (b*d*f^3*x^2*e +
 2*b*d*f^2*x*e^2 + b*d*f*e^3)*cos_integral(-(d*f*x + d*e)*e^(-1)/x) + (b*d^2*f^4*x^2 + 2*b*d^2*f^3*x*e + b*d^2
*f^2*e^2)*sin_integral((d*f*x + d*e)*e^(-1)/x))*cos(-(d*f - c*e)*e^(-1)) + 2*(b*d*f^3*x^2*e + b*d*f^2*x*e^2)*c
os((c*x + d)/x) + 2*a*e^4 + ((b*d^2*f^4*x^2 + 2*b*d^2*f^3*x*e + b*d^2*f^2*e^2)*cos_integral((d*f*x + d*e)*e^(-
1)/x) + (b*d^2*f^4*x^2 + 2*b*d^2*f^3*x*e + b*d^2*f^2*e^2)*cos_integral(-(d*f*x + d*e)*e^(-1)/x) - 4*(b*d*f^3*x
^2*e + 2*b*d*f^2*x*e^2 + b*d*f*e^3)*sin_integral((d*f*x + d*e)*e^(-1)/x))*sin(-(d*f - c*e)*e^(-1)) - 2*(b*f^2*
x^2*e^2 + 2*b*f*x*e^3)*sin((c*x + d)/x))/(f^3*x^2*e^4 + 2*f^2*x*e^5 + f*e^6)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b \sin {\left (c + \frac {d}{x} \right )}}{\left (e + f x\right )^{3}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))/(f*x+e)**3,x)

[Out]

Integral((a + b*sin(c + d/x))/(e + f*x)**3, x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1502 vs. \(2 (211) = 422\).
time = 7.65, size = 1502, normalized size = 6.45 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))/(f*x+e)^3,x, algorithm="giac")

[Out]

-1/2*(b*d^5*f^3*cos_integral((d*f - c*e + (c*x + d)*e/x)*e^(-1))*sin(-(d*f - c*e)*e^(-1)) - 2*b*c*d^4*f^2*cos_
integral((d*f - c*e + (c*x + d)*e/x)*e^(-1))*e*sin(-(d*f - c*e)*e^(-1)) - b*d^5*f^3*cos(-(d*f - c*e)*e^(-1))*s
in_integral(-(d*f - c*e + (c*x + d)*e/x)*e^(-1)) + 2*b*c*d^4*f^2*cos(-(d*f - c*e)*e^(-1))*e*sin_integral(-(d*f
 - c*e + (c*x + d)*e/x)*e^(-1)) + 2*b*d^4*f^2*cos(-(d*f - c*e)*e^(-1))*cos_integral((d*f - c*e + (c*x + d)*e/x
)*e^(-1))*e + b*c^2*d^3*f*cos_integral((d*f - c*e + (c*x + d)*e/x)*e^(-1))*e^2*sin(-(d*f - c*e)*e^(-1)) + 2*(c
*x + d)*b*d^4*f^2*cos_integral((d*f - c*e + (c*x + d)*e/x)*e^(-1))*e*sin(-(d*f - c*e)*e^(-1))/x - b*c^2*d^3*f*
cos(-(d*f - c*e)*e^(-1))*e^2*sin_integral(-(d*f - c*e + (c*x + d)*e/x)*e^(-1)) - 2*(c*x + d)*b*d^4*f^2*cos(-(d
*f - c*e)*e^(-1))*e*sin_integral(-(d*f - c*e + (c*x + d)*e/x)*e^(-1))/x + 2*b*d^4*f^2*e*sin(-(d*f - c*e)*e^(-1
))*sin_integral(-(d*f - c*e + (c*x + d)*e/x)*e^(-1)) - 4*b*c*d^3*f*cos(-(d*f - c*e)*e^(-1))*cos_integral((d*f
- c*e + (c*x + d)*e/x)*e^(-1))*e^2 + b*d^4*f^2*cos((c*x + d)/x)*e - 2*(c*x + d)*b*c*d^3*f*cos_integral((d*f -
c*e + (c*x + d)*e/x)*e^(-1))*e^2*sin(-(d*f - c*e)*e^(-1))/x + 2*(c*x + d)*b*c*d^3*f*cos(-(d*f - c*e)*e^(-1))*e
^2*sin_integral(-(d*f - c*e + (c*x + d)*e/x)*e^(-1))/x - 4*b*c*d^3*f*e^2*sin(-(d*f - c*e)*e^(-1))*sin_integral
(-(d*f - c*e + (c*x + d)*e/x)*e^(-1)) + 2*b*c^2*d^2*cos(-(d*f - c*e)*e^(-1))*cos_integral((d*f - c*e + (c*x +
d)*e/x)*e^(-1))*e^3 - b*c*d^3*f*cos((c*x + d)/x)*e^2 + 4*(c*x + d)*b*d^3*f*cos(-(d*f - c*e)*e^(-1))*cos_integr
al((d*f - c*e + (c*x + d)*e/x)*e^(-1))*e^2/x + (c*x + d)^2*b*d^3*f*cos_integral((d*f - c*e + (c*x + d)*e/x)*e^
(-1))*e^2*sin(-(d*f - c*e)*e^(-1))/x^2 - (c*x + d)^2*b*d^3*f*cos(-(d*f - c*e)*e^(-1))*e^2*sin_integral(-(d*f -
 c*e + (c*x + d)*e/x)*e^(-1))/x^2 + 2*b*c^2*d^2*e^3*sin(-(d*f - c*e)*e^(-1))*sin_integral(-(d*f - c*e + (c*x +
 d)*e/x)*e^(-1)) + 4*(c*x + d)*b*d^3*f*e^2*sin(-(d*f - c*e)*e^(-1))*sin_integral(-(d*f - c*e + (c*x + d)*e/x)*
e^(-1))/x - 4*(c*x + d)*b*c*d^2*cos(-(d*f - c*e)*e^(-1))*cos_integral((d*f - c*e + (c*x + d)*e/x)*e^(-1))*e^3/
x + (c*x + d)*b*d^3*f*cos((c*x + d)/x)*e^2/x - b*d^3*f*e^2*sin((c*x + d)/x) - 4*(c*x + d)*b*c*d^2*e^3*sin(-(d*
f - c*e)*e^(-1))*sin_integral(-(d*f - c*e + (c*x + d)*e/x)*e^(-1))/x + 2*(c*x + d)^2*b*d^2*cos(-(d*f - c*e)*e^
(-1))*cos_integral((d*f - c*e + (c*x + d)*e/x)*e^(-1))*e^3/x^2 - a*d^3*f*e^2 + 2*b*c*d^2*e^3*sin((c*x + d)/x)
+ 2*(c*x + d)^2*b*d^2*e^3*sin(-(d*f - c*e)*e^(-1))*sin_integral(-(d*f - c*e + (c*x + d)*e/x)*e^(-1))/x^2 + 2*a
*c*d^2*e^3 - 2*(c*x + d)*b*d^2*e^3*sin((c*x + d)/x)/x - 2*(c*x + d)*a*d^2*e^3/x)/((d^2*f^2*e^4 - 2*c*d*f*e^5 +
 c^2*e^6 + 2*(c*x + d)*d*f*e^5/x - 2*(c*x + d)*c*e^6/x + (c*x + d)^2*e^6/x^2)*d)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {a+b\,\sin \left (c+\frac {d}{x}\right )}{{\left (e+f\,x\right )}^3} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(c + d/x))/(e + f*x)^3,x)

[Out]

int((a + b*sin(c + d/x))/(e + f*x)^3, x)

________________________________________________________________________________________